<template>
  <div class='login-frame'>
    <el-dialog
      title="登录"
      :visible.sync="$store.state.loginDialog"
      width="40%"
      class='loginElDialog'>
      <div class='loginMode'>
        <div v-if="qrcode">
          <login-qr-code @more-method='moremode'></login-qr-code>
        </div>
        <div v-else>
          <login-more-mode></login-more-mode>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import loginQrCode from './loginQrCode'
import loginMoreMode from './loginMoreMode'
export default {
  name: 'loginFrame',
  data () {
    return {
      qrcode: true
    }
  },
  components: {
    loginQrCode,
    loginMoreMode
  },
  methods: {
    // loginCancel () {
    //   this.$store.commit('loginVisible', false)
    // },
    // loginDetermine () {
    //   this.$store.commit('loginVisible', false)
    // },
    moremode (qrcode) {
      this.qrcode = qrcode
      console.log(qrcode)
    }
  }
}
</script>

<style lang="less">
  .el-dialog__header {
    background-color: rgba(45, 45, 45)
  }
  .el-dialog__title {
    font-weight:bold;
    font-size: 14px;
    color: #fff
  }
</style>
